package item;

import item.defensive.RandomDefensive;
import item.drone.RandomAttackDrone;
import item.engine.RandomEngine;
import item.mod.RandomMod;
import item.weapon.RandomWeapon;

import java.util.Random;

public class RandomItem {
	public static Item random(int level) {
		Random r = new Random();
		Item i = RandomWeapon.random(1);
		switch(r.nextInt(5)) {
			case 0: 
				return (Item) RandomDefensive.random(level);
			case 1:
				return RandomWeapon.random(level);
			case 2:
				return RandomEngine.random(level);
			case 3:
				return RandomAttackDrone.random(level);
			case 4:
				return RandomMod.random(level);
		}
		return i;
	}
}
